﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Qpm.Automap.Core.UI
{
    public partial class CustomDatePicker : Form
    {
        public DateTime SelectedDate { get; set; }

        public CustomDatePicker()
        {
            InitializeComponent();
        }

        public CustomDatePicker(DateTime selectedDate)
        {
            SelectedDate = selectedDate;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            SelectedDate = monthCalendar1.SelectionStart;
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void CustomDatePicker_Load(object sender, EventArgs e)
        {
            monthCalendar1.SelectionStart = SelectedDate;
        }
    }
}
